#include <cstdio>
#define LL long long

int main() {
	int T;
	scanf("%d", &T);
	for (int k=1; k<=T; k++) {
		LL N;
		scanf("%lld", &N);
		LL ans = (N+2)*(N-1)/2;
		printf("Case #%d: %lld\n", k, ans);
	}
	return 0;
}
